﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel;

namespace InternshipManagement.Models
{
    [MetadataType(typeof(Course_Validation))]
    public partial class Course
    {
        public string DisplayName
        {
            get
            {
                return string.Concat(Code, "-", Semester.Season,"-",Semester.Year);
            }
        }
    }

    public class Course_Validation
    {
        [Required(ErrorMessage = "Semester is required")]
        [DisplayName("Semester")]
        public string SemesterID { get; set; }
        [Required(ErrorMessage = "Code is required")]
        public string Code { get; set; }

    }
}